package java9;

import java.util.Scanner;

public class Code118 {
	public static void main(String[] args) {
		int[] score=new int[4];
		int classNum=3;
		double sum=0;
		double avg=0;
		int count=0;
		Scanner input=new Scanner(System.in);
		for(int i=1;i<=classNum;i++){
			System.out.println("输入第"+i+"个班级的成绩");
			for (int j = 0; j < score.length; j++) {
				System.out.println("请输入第"+i+"个班级第"+(j+1)+"个同学的成绩");
				score[j]=input.nextInt();
				sum+=score[j];	
				if(score[j]<85){
					continue;
				}
				count++;
			}
			avg=sum/score.length;
			System.out.println("第"+i+"个班级参赛学员的平均分为"+avg+"\n\n");
		}
		System.out.println("85以上为"+count+"人");
	}
}
